<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>case穿透</title>
  </head>

  <body>
    <!-- 考试成绩 90+优 80+良 60+中 hotChicken -->
    <script>
      var score = parseInt(Math.random() * 100);
      console.log("score=", score);

      switch (true) {
        case score >= 90:
          console.log("优秀");
          break;
        case score >= 80:
          console.log("还行");
          break;
        case score >= 60:
          console.log("一般");
          break;
        default:
          console.log("hotChicken");
          break;
      }
    </script>
  </body>
</html>
